package com.wulis.common.enums;

import lombok.AllArgsConstructor;

/**
 * Http接口状态码枚举类
 *
 * @author WuliBao
 * @date 2020-03-31
 */
@AllArgsConstructor
public enum HttpStatusEnum {
    /**
     * 状态码及提示信息
     */
    SUCCESS(2020200, "操作成功"),
    
    ILLEGAL_ARGUMENT(2020400, "非法参数"),
    
    UNAUTHORIZED(2020401, "认证失败"),
    
    NO_PERMISSION(2020402, "权限不足"),
    
    ERROR(2020500, "内部异常"),
    
    ROLE_MARK_EXISTS(2020600, "权限字符已存在"),
    
    ACCOUNT_EXISTS(2020601, "账号已存在"),
    
    PHONE_NUMBER_EXISTS(2020602, "电话号码已存在");
    
    private final Integer code;
    
    private final String message;
    
    public Integer code() {
        return this.code;
    }
    
    public String message() {
        return this.message;
    }
    
}
